<?php /* Smarty version Smarty-3.1.8, created on 2012-05-29 06:47:26
         compiled from "templates\index.tpl" */ ?>
<?php /*%%SmartyHeaderCode:139594fc40d02c06193-80898668%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'f90be83b235fb03cc225b11607032e9ddd415899' => 
    array (
      0 => 'templates\\index.tpl',
      1 => 1338266819,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '139594fc40d02c06193-80898668',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.8',
  'unifunc' => 'content_4fc40d0307e612_64458360',
  'variables' => 
  array (
    'host' => 0,
    'system' => 0,
    'value' => 0,
    '_LOGGED' => 0,
    'komunikat' => 0,
    'nawig1' => 0,
    's1' => 0,
    's2' => 0,
    'gatunki' => 0,
    'film' => 0,
    'filmy' => 0,
    'sale' => 0,
    'seans' => 0,
    'seansy' => 0,
    'gatunek' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_4fc40d0307e612_64458360')) {function content_4fc40d0307e612_64458360($_smarty_tpl) {?><?php if (!is_callable('smarty_modifier_replace')) include 'D:\\xampp\\htdocs\\ekino\\smarty\\plugins\\modifier.replace.php';
if (!is_callable('smarty_modifier_date_format')) include 'D:\\xampp\\htdocs\\ekino\\smarty\\plugins\\modifier.date_format.php';
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>Ekino</title>
	
	<style>
		body,html{margin:0;padding:0; font-family:Arial; font-size:90%;}
		ul{width:270px;}
		ul{list-style-type:none; margin-left:0; padding-left:0;}
		ul li{border-bottom:1px solid #e0e0e0;}
		ul li a{color:#aaa; text-decoration:none;}
		ul li a:hover{color:#bfbfbf;}
	</style>
	
	<base href="http://<?php echo $_smarty_tpl->tpl_vars['host']->value;?>
/">
	<link type="text/css" rel="stylesheet" href="../css/template.css">
	<link type="text/css" rel="stylesheet" href="./css/jquery-ui-1.8.20.custom.css">
	<script type="text/javascript" src="../js/jquery.js"></script>
	
	
	<?php  $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['value']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['system']->value->pobierz_wszystkie_js(); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value){
$_smarty_tpl->tpl_vars['value']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['value']->key;
?>
		<script type="text/javascript" src="./js/<?php echo $_smarty_tpl->tpl_vars['value']->value;?>
"></script>
	<?php } ?>		
	<script type="text/javascript" src="./js/jquery-ui-1.8.20.custom.min.js"></script>
	
	<?php  $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['value']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['system']->value->pobierz_wszystkie_css(); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value){
$_smarty_tpl->tpl_vars['value']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['value']->key;
?>
		<link type="text/css" rel="stylesheet" href="./css/<?php echo $_smarty_tpl->tpl_vars['value']->value;?>
">
	<?php } ?>	
	
</head>
<body>	
	<div style="margin:0 auto; width:1024px;">
		<div style="background:#eee; width:100%; height:100px; padding-top:10px;">
			<div style="float:left; margin-left:10px; padding-right:10px; display:block;">
				<a href="./index.php" ><img src="./images/logo2.png" alt="" width="80"/></a>
			</div>
			<div style="margin:10px; text-align:right; padding:4px; background:#fff;">
				<?php if ($_smarty_tpl->tpl_vars['_LOGGED']->value){?>
					<a href="./logout.php" alt="" />Wyloguj</a>
				<?php }?>
			</div>
			<div>
				<h1>Ekino - Panel repa.....</h1>
			</div>
		</div>
			<?php if (isset($_smarty_tpl->tpl_vars['komunikat']->value)){?>
				<div style="background:#1e1; border:1px solid #ddd;"><?php echo $_smarty_tpl->tpl_vars['komunikat']->value;?>
</div>
			<?php }?>
		<center>
			

		<?php if (!$_smarty_tpl->tpl_vars['_LOGGED']->value){?>
			<div style="margin:10px;">
				<div id="login">
				<form method="post" action="./index.php">
					<div class="left">Użytkownik:</div><div><input type="text" name="username" /></div>
					<div class="left">Hasło:</div><div><input type="password" name="userpass" /></div>
					 <div class="submit"><input type="submit" value="Zaloguj się" name="submit" /></div>
				</form>
				</div>
			</div>
		<?php }else{ ?>
			
			<div style='width:723px; float:left; padding-left:5px;  height:18px; font-size:11px; background-color:#DEF7FF; text-align:left; line-height:18px; border:1px solid #eee; margin-top:5px; margin-bottom;5px; '> 
				<a href='./index.php' />Strona główna</a>
				<?php if (isset($_smarty_tpl->tpl_vars['nawig1']->value)){?>
				»
				<a href="./<?php echo $_smarty_tpl->tpl_vars['nawig1']->value['url'];?>
" /><?php echo $_smarty_tpl->tpl_vars['nawig1']->value['nazwa'];?>
</a>
				<?php }?>
			</div>
			<div style='width:100%; clear:both; height:5px;'></div>
			<?php if ($_smarty_tpl->tpl_vars['s1']->value=='film'){?>
				<?php if (isset($_smarty_tpl->tpl_vars['s2']->value)&&$_smarty_tpl->tpl_vars['s2']->value=='dodaj_film'){?>
					<form action="./film.php?action=dodaj_film" method="post" enctype="multipart/form-data">
						<div style='width:200px;'>Tytuł:</div><input type="text" name='tytul' /><br />
						<div style='width:200px;'>Opis:</div><input type="text" name='opis' /><br />
						<div style='width:200px;'>Limit wieku:</div><input type="text" name='limit_wieku' /><br />
						<div style='width:200px;'>Czas trwania:</div><input type="text" name='czas_trwania' /><br />
						<div style='width:200px;'>Obraz:</div><input type="file" name='obraz' /><br />
						<div style='width:200px;'>Premiera:</div><input type="text" name='premiera' id="datepicker" /><br />
						<div style='width:200px;'>Produkcja:</div><input type="text" name='produkcja' /><br />
						<div style='width:200px;'>Scenariusz:</div><input type="text" name='scenariusz' /><br />
						<div style='width:200px;'>Gatunek:</div><select name='gatunek'>
						<?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['k'])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']['k']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['gatunki']->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['name'] = 'k';
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total']);
?>
							<option value="<?php echo $_smarty_tpl->tpl_vars['gatunki']->value[$_smarty_tpl->getVariable('smarty')->value['section']['k']['index']]['id_gatunek'];?>
"><?php echo $_smarty_tpl->tpl_vars['gatunki']->value[$_smarty_tpl->getVariable('smarty')->value['section']['k']['index']]['nazwa'];?>
</option>
						<?php endfor; endif; ?>
						</select><br />
						<br />
						<input type="submit" value="Dodaj" />
					</form>
					<script>
						$(function() {
							$( "#datepicker" ).datepicker("option", "dateFormat","yyyy-mm-dd");
						});
					</script>
				<?php }elseif(isset($_smarty_tpl->tpl_vars['s2']->value)&&$_smarty_tpl->tpl_vars['s2']->value=='edytuj_film'){?>
					<form action="./film.php?action=edytuj_film&id=<?php echo $_smarty_tpl->tpl_vars['film']->value['id_film'];?>
" method="post" enctype="multipart/form-data">
						<div style='width:200px;'>Tytuł:</div><input type="text" name='tytul' value='<?php echo $_smarty_tpl->tpl_vars['film']->value['tytul'];?>
' /><br />
						<div style='width:200px;'>Opis:</div><input type="text" name='opis' value='<?php echo $_smarty_tpl->tpl_vars['film']->value['opis'];?>
' /><br />
						<div style='width:200px;'>Limit wieku:</div><input type="text" name='limit_wieku' value='<?php echo $_smarty_tpl->tpl_vars['film']->value['limit_wieku'];?>
' /><br />
						<div style='width:200px;'>Czas trwania (min):</div><input type="text" name='czas_trwania' value='<?php echo $_smarty_tpl->tpl_vars['film']->value['czas_trwania'];?>
' /><br />
						<div style='width:200px;'>Obraz:</div>
						<?php if (isset($_smarty_tpl->tpl_vars['film']->value['image'])){?>
							<div id="exists-img">
								<img src='../images/filmy/<?php echo $_smarty_tpl->tpl_vars['film']->value['image'];?>
' width='200'/>  <br /><a id="usun-img" style='cursor:pointer; color:red;'>Usuń</a>
							</div>
						<?php }else{ ?>
							<input type="file" name='obraz' />
						<?php }?>
						<br />
						<div style='width:200px;'>Premiera:</div><input type="text" name='premiera' value='<?php echo smarty_modifier_replace($_smarty_tpl->tpl_vars['film']->value['premiera'],'-','/');?>
' id="datepicker" /><br />
						<div style='width:200px;'>Produkcja:</div><input type="text" name='produkcja' value='<?php echo $_smarty_tpl->tpl_vars['film']->value['produkcja'];?>
' /><br />
						<div style='width:200px;'>Scenariusz:</div><input type="text" name='scenariusz' value='<?php echo $_smarty_tpl->tpl_vars['film']->value['scenariusz'];?>
' /><br />
						<div style='width:200px;'>Gatunek:</div><select name='gatunek'>
						<?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['k'])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']['k']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['gatunki']->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['name'] = 'k';
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total']);
?>
							<option value="<?php echo $_smarty_tpl->tpl_vars['gatunki']->value[$_smarty_tpl->getVariable('smarty')->value['section']['k']['index']]['id_gatunek'];?>
" <?php if ($_smarty_tpl->tpl_vars['film']->value['gatunek']==$_smarty_tpl->tpl_vars['gatunki']->value[$_smarty_tpl->getVariable('smarty')->value['section']['k']['index']]['id_gatunek']){?>selected='selected'<?php }?>><?php echo $_smarty_tpl->tpl_vars['gatunki']->value[$_smarty_tpl->getVariable('smarty')->value['section']['k']['index']]['nazwa'];?>
</option>
						<?php endfor; endif; ?>
						</select><br />
						<br />
						<input type="submit" value="Zapisz" />

					</form>
					<script>
						$("#usun-img").click(function(){
							$("#exists-img").hide();
							$("#exists-img").after("<input type='file' name='obraz' />");
						});
					
					</script>
					<script>
						$(function() {
							$( "#datepicker" ).datepicker();
							$("#datepicker").datepicker.parseDate('yy-mm-dd', '<?php echo $_smarty_tpl->tpl_vars['film']->value['premiera'];?>
');
							$( "#datepicker" ).datepicker("option", "dateFormat","yy-mm-dd");
						});
					</script>
				<?php }else{ ?>
					<table>
						<?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['k'])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']['k']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['name'] = 'k';
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['filmy']->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total']);
?>
							<tr><td><?php echo $_smarty_tpl->tpl_vars['filmy']->value[$_smarty_tpl->getVariable('smarty')->value['section']['k']['index']]['id_film'];?>
</td><td><?php echo $_smarty_tpl->tpl_vars['filmy']->value[$_smarty_tpl->getVariable('smarty')->value['section']['k']['index']]['tytul'];?>
</td><td><a href='./film.php?action=edytuj_film&id=<?php echo $_smarty_tpl->tpl_vars['filmy']->value[$_smarty_tpl->getVariable('smarty')->value['section']['k']['index']]['id_film'];?>
'>Edytuj</a> | <a href='./film.php?action=usun_film&id=<?php echo $_smarty_tpl->tpl_vars['filmy']->value[$_smarty_tpl->getVariable('smarty')->value['section']['k']['index']]['id_film'];?>
'>Usuń</a></td></tr>
						<?php endfor; endif; ?>
					</table>
					<a href='./film.php?action=dodaj_film' >Dodaj film</a>
				<?php }?>
			<?php }elseif($_smarty_tpl->tpl_vars['s1']->value=='seans'){?>
				<?php if ($_smarty_tpl->tpl_vars['s2']->value=='dodaj_seans'){?>
					<script>
						$(function() {
							$( "#datepicker" ).datepicker();
							$( "#datepicker" ).datepicker("option", "dateFormat","yy-mm-dd");
						});
					</script>
				
					<form action="./seans.php?action=dodaj_seans" method="post" >
						<div style='width:200px;'>Film:</div><select name='filmy'><?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['k'])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']['k']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['name'] = 'k';
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['filmy']->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total']);
?><option value="<?php echo $_smarty_tpl->tpl_vars['filmy']->value[$_smarty_tpl->getVariable('smarty')->value['section']['k']['index']]['id_film'];?>
"><?php echo $_smarty_tpl->tpl_vars['filmy']->value[$_smarty_tpl->getVariable('smarty')->value['section']['k']['index']]['tytul'];?>
</option><?php endfor; endif; ?></select><br />						
						<div style='width:200px;'>Sala:</div><select name='sale'><?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['k'])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']['k']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['name'] = 'k';
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['sale']->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total']);
?><option value="<?php echo $_smarty_tpl->tpl_vars['sale']->value[$_smarty_tpl->getVariable('smarty')->value['section']['k']['index']]['id_sala'];?>
">Sala #<?php echo $_smarty_tpl->tpl_vars['sale']->value[$_smarty_tpl->getVariable('smarty')->value['section']['k']['index']]['numer'];?>
</option><?php endfor; endif; ?></select><br />
						<div style='width:200px;'>Termin (dzien):</div><input type="text" id="datepicker" name="termin"><br />
						<div style='width:200px;'>Termin (h) np: 22:00</div><input type="text" name="termin_godzina"><br />
						<div style='width:200px;'>Cena biletu:</div><input type="text" name="cena_biletu"><br />
						<br />
						<input type="submit" value="Dodaj" />
					</form>				
				<?php }elseif($_smarty_tpl->tpl_vars['s2']->value=='edytuj_seans'){?>				
					<form action="./seans.php?action=edytuj_seans" method="post" >
						<div style='width:200px;'>Film:</div>
						<select name='filmy'>
						<?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['k'])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']['k']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['name'] = 'k';
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['filmy']->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total']);
?>
							<option value="<?php echo $_smarty_tpl->tpl_vars['filmy']->value[$_smarty_tpl->getVariable('smarty')->value['section']['k']['index']]['id_film'];?>
" <?php if ($_smarty_tpl->tpl_vars['filmy']->value[$_smarty_tpl->getVariable('smarty')->value['section']['k']['index']]['id_film']==$_smarty_tpl->tpl_vars['seans']->value['id_film']){?>selected='selected'<?php }?>><?php echo $_smarty_tpl->tpl_vars['filmy']->value[$_smarty_tpl->getVariable('smarty')->value['section']['k']['index']]['tytul'];?>
</option>
						<?php endfor; endif; ?>
						</select><br />						
						<div style='width:200px;'>Sala:</div><select name='filmy'><?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['k'])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']['k']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['name'] = 'k';
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['sale']->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total']);
?><option value="<?php echo $_smarty_tpl->tpl_vars['sale']->value[$_smarty_tpl->getVariable('smarty')->value['section']['k']['index']]['id_sala'];?>
" <?php if ($_smarty_tpl->tpl_vars['sale']->value[$_smarty_tpl->getVariable('smarty')->value['section']['k']['index']]['id_sala']==$_smarty_tpl->tpl_vars['seans']->value['id_sala']){?>selected='selected'<?php }?>>Sala #<?php echo $_smarty_tpl->tpl_vars['sale']->value[$_smarty_tpl->getVariable('smarty')->value['section']['k']['index']]['numer'];?>
</option><?php endfor; endif; ?></select><br />
						<div style='width:200px;'>Termin (dzien):</div><input type="text" id="datepicker" name="termin" value="<?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['seans']->value['termin'],'%Y-%m-%d');?>
"><br /><div style='width:200px;'>Termin (h):</div><input type="text" name="termin_godzina" value='<?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['seans']->value['termin'],'%H:%M');?>
'><br />
						<div style='width:200px;'>Cena biletu:</div><input type="text" name="cena_biletu" value="<?php echo $_smarty_tpl->tpl_vars['seans']->value['cena_biletu'];?>
"><br />
						<br />
						<input type="submit" value="Zapisz" />
					</form>
					
					<script>
						$(function() {
							$( "#datepicker" ).datepicker();
							$("#datepicker").datepicker.parseDate('yy-mm-dd', '<?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['seans']->value['termin'],'%Y-%m-%d');?>
');
							$( "#datepicker" ).datepicker("option", "dateFormat","yy-mm-dd");
						});
					</script>
				<?php }else{ ?>
					<table>
						<?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['k'])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']['k']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['name'] = 'k';
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['seansy']->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total']);
?>
							<tr><td><?php echo $_smarty_tpl->getVariable('smarty')->value['section']['k']['index'];?>
</td>
							<td><?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['q'])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']['q']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['q']['name'] = 'q';
$_smarty_tpl->tpl_vars['smarty']->value['section']['q']['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['filmy']->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['q']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['q']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['q']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['q']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['q']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['q']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['q']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['q']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['q']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['q']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['q']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['q']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['q']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['q']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['q']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['total']);
?>
									<?php if ($_smarty_tpl->tpl_vars['seansy']->value[$_smarty_tpl->getVariable('smarty')->value['section']['k']['index']]['id_film']==$_smarty_tpl->tpl_vars['filmy']->value[$_smarty_tpl->getVariable('smarty')->value['section']['q']['index']]['id_film']){?><?php echo $_smarty_tpl->tpl_vars['filmy']->value[$_smarty_tpl->getVariable('smarty')->value['section']['q']['index']]['tytul'];?>
<?php }?>
								<?php endfor; endif; ?>
							</td>							
							<td><?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['q'])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']['q']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['q']['name'] = 'q';
$_smarty_tpl->tpl_vars['smarty']->value['section']['q']['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['sale']->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['q']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['q']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['q']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['q']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['q']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['q']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['q']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['q']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['q']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['q']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['q']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['q']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['q']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['q']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['q']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['q']['total']);
?>
									<?php if ($_smarty_tpl->tpl_vars['seansy']->value[$_smarty_tpl->getVariable('smarty')->value['section']['k']['index']]['id_sala']==$_smarty_tpl->tpl_vars['sale']->value[$_smarty_tpl->getVariable('smarty')->value['section']['q']['index']]['id_sala']){?><?php echo $_smarty_tpl->tpl_vars['sale']->value[$_smarty_tpl->getVariable('smarty')->value['section']['q']['index']]['numer'];?>
<?php }?>
								<?php endfor; endif; ?>
							</td>
							<td><?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['seansy']->value[$_smarty_tpl->getVariable('smarty')->value['section']['k']['index']]['termin'],'%Y-%m-%d %H:%M');?>
</td>
							<td><a href='./seans.php?action=edytuj_seans&id=<?php echo $_smarty_tpl->tpl_vars['seansy']->value[$_smarty_tpl->getVariable('smarty')->value['section']['k']['index']]['id_seans'];?>
'>Edytuj</a> | <a href='./seans.php?action=usun_seans&id=<?php echo $_smarty_tpl->tpl_vars['seansy']->value[$_smarty_tpl->getVariable('smarty')->value['section']['k']['index']]['id_seans'];?>
'>Usuń</a></td></tr>
						<?php endfor; endif; ?>
					</table>
					<a href='./seans.php?action=dodaj_seans' >Dodaj seans</a>
				<?php }?>
			<?php }elseif($_smarty_tpl->tpl_vars['s1']->value=='sala'){?>
				<?php echo $_smarty_tpl->getSubTemplate ('sala.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

			<?php }elseif($_smarty_tpl->tpl_vars['s1']->value=='gatunek'){?>
				<?php if (isset($_smarty_tpl->tpl_vars['s2']->value)&&$_smarty_tpl->tpl_vars['s2']->value=='dodaj_gatunek'){?>
				<form action="./gatunek.php?action=dodaj_gatunek" method="post">
					<div style='width:200px;'>Nazwa:</div><input type="text" name='nazwa' value='' /><br />
					<br />
					<input type="submit" value="Dodaj" />
				</form>
				<?php }elseif($_smarty_tpl->tpl_vars['s2']->value=='edytuj_gatunek'){?>
					<form action="./gatunek.php?action=edytuj_gatunek&id=<?php echo $_smarty_tpl->tpl_vars['gatunek']->value['id_gatunek'];?>
" method="post">
						<div style='width:200px;'>Nazwa:</div><input type="text" name='nazwa' value='<?php echo $_smarty_tpl->tpl_vars['gatunek']->value['nazwa'];?>
' /><br />
						<br />
						<input type="submit" value="Zapisz" />
					</form>
				<?php }else{ ?>
					<table>
						<?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['k'])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']['k']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['name'] = 'k';
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['gatunki']->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['k']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['k']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['k']['total']);
?>
							<tr><td><?php echo $_smarty_tpl->getVariable('smarty')->value['section']['k']['index']+1;?>
</td><td><?php echo $_smarty_tpl->tpl_vars['gatunki']->value[$_smarty_tpl->getVariable('smarty')->value['section']['k']['index']]['nazwa'];?>
</td><td><a href='./gatunek.php?action=edytuj_gatunek&id=<?php echo $_smarty_tpl->tpl_vars['gatunki']->value[$_smarty_tpl->getVariable('smarty')->value['section']['k']['index']]['id_gatunek'];?>
'>Edytuj</a> | <a href='./gatunek.php?action=usun_gatunek&id=<?php echo $_smarty_tpl->tpl_vars['gatunki']->value[$_smarty_tpl->getVariable('smarty')->value['section']['k']['index']]['id_gatunek'];?>
'>Usuń</a></td></tr>
						<?php endfor; endif; ?>
					</table>
					<a href='./gatunek.php?action=dodaj_gatunek' >Dodaj gatunek</a>
				<?php }?>
			<?php }else{ ?>
				<div id="srodek" style="height: 100%; min-height: 100px;">
					<a href='seans.php' >Zarządzanie seansów</a> | <a href='film.php' >Zarządzanie filmów</a> | <a href='gatunek.php' >Zarządzanie gatunków</a> | <a href='sala.php' >Zarządzanie sal</a>
				</div>
			<?php }?>
		<?php }?>

		</center>
		<div style="clear:both; width:100%; text-align:center; font-size:10px; background:#eee;">Copyright 2012 - <br />Maciej Pochroń, Adam Nowak, Leszek Rączka</div>
	</div>

</body>
</html<?php }} ?>